class Mailer < ActionMailer::Base

  def registration_mail(user, unencrypted_password, activate_url)
    setup_email    
    @recipients = user.email
    @subject = '欢迎加入彩艺空间'
    @body = { 'user' => user, 'password' => unencrypted_password, 'activate_url' => activate_url }
  end

  protected
    def setup_email
      @from = 'webmaster@erocx.com'
      @headers['Content-Type'] = "text/plain; charset=UTF-8; format=flowed"
    end

end
